{% load i18n %}
<h3>{% trans "Summary" %}</h3>
<table>
	<thead>
	<tr>
		<th>{% trans "Total Calls" %}</th>
		<th>{% trans "Total Time" %}</th>
		<th>{% trans "Cache Hits" %}</th>
		<th>{% trans "Cache Misses" %}</th>
	</tr>
	</thead>
	<tbody>
	<tr>
		<td>{{ total_calls }}</td>
		<td>{{ total_time }} ms</td>
		<td>{{ hits }}</td>
		<td>{{ misses }}</td>
	</tr>
	</tbody>
</table>
<h3>{% trans "Commands" %}</h3>
<table>
	<thead>
	<tr>
	{% for name in counts.iterkeys %}
		<th>{{ name }}</th>
	{% endfor %}
	</tr>
	</thead>
	<tbody>
	<tr>
	{% for value in counts.itervalues %}
		<td>{{ value }}</td>
	{% endfor %}
	</tr>
	</tbody>
</table>
{% if calls %}
<h3>{% trans "Calls" %}</h3>
<table>
	<thead>
		<tr>
			<th colspan="2">{% trans "Time (ms)" %}</th>
			<th>{% trans "Type" %}</th>
			<th>{% trans "args" %}</th>
			<th>{% trans "kwargs" %}</th>
			<th>{% trans "Backend" %}</th>
		</tr>
	</thead>
	<tbody>
	{% for call in calls %}
		<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}" id="cacheMain_{{ forloop.counter }}">
			<td class="toggle">
				<a class="djToggleSwitch" data-toggle-name="cacheMain" data-toggle-id="{{ forloop.counter }}" data-toggle-open="+" data-toggle-close="-" href="javascript:void(0)">+</a>
			</td>
			<td>{{ call.time|floatformat:"4" }}</td>
			<td>{{ call.name|escape }}</td>
			<td>{{ call.args|escape }}</td>
			<td>{{ call.kwargs|escape }}</td>
			<td>{{ call.backend }}</td>
		</tr>
		<tr class="djUnselected djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %} djToggleDetails_{{ forloop.counter }}" id="cacheDetails_{{ forloop.counter }}">
			<td colspan="1"></td>
			<td colspan="5"><pre class="stack">{{ call.trace }}</pre></td>
		</tr>
	{% endfor %}
	</tbody>
</table>
{% endif %}